home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / basic / cursor.lha / Cursor / Cursor.doc < prev    next >
Encoding:
Text File  |  1994-02-24  |  10.8 KB  |  369 lines

  1.  
  2.  Cursor V1.7 - A BASIC-compiler
  3.  (c) Copyright 1990-1994 Jürgen Forster
  4.  
  5. This program is shareware. You may give it to any other person for a small
  6. copying fee, but if you use it for a longer time you should send 15$ or
  7. 20 DM to the author.
  8.  
  9. "Cursor" translates BASIC-programmes which are written for the AmigaBASIC-
  10. interpreter in programmes that can be used directly from the CLI or from
  11. the Workbench and that are faster than the original programmes. Not all
  12. BASIC-commands are implemented, for a list of supported commands look
  13. at "SUPPORTED COMMANDS AND FUNCTIONS".
  14.  
  15. I cannot be made responsible for any damage "Cursor" might cause. Use it at
  16. your own risk.
  17.  
  18. Programmes compiled with "Cursor" may only be distributed or sold if you
  19. have paid the shareware fee.
  20.  
  21.  
  22.  
  23.  
  24.   INSTALLATION
  25.  
  26. To use "Cursor" copy the file "Cursor" to your C:-directory and the file
  27. "basic.library" to your "LIBS:"-directory. All programmes that were compiled
  28. without the "STANDALONE"-option (see "OPTIONS") need this library.
  29. "Cursor" also needs the math-libraries "mathtrans.library",
  30. "mathieeedoubbas.library" and "mathieeedoubtrans.library",
  31. which must be in your "LIBS:"-directory.
  32. "Cursor" writes some temporary files into the T:-directory, so it is best
  33. to assign T: to the RAM-disk ("assign T: RAM:").
  34.  
  35.  
  36.  
  37.  
  38.   USAGE
  39.  
  40. You can only compile BASIC-programmes in the ASCII-format (use
  41. SAVE "name.bas",A in the AmigaBASIC-interpreter).
  42. From the CLI call "Cursor" with the name of the BASIC-program as the
  43. parameter. You can also set some options (see "OPTIONS").
  44. To use "Cursor" from the workbench you should use the editor "CursorMenu"
  45. (which can of course be started from the CLI, too). You can specify the
  46. options from menus if you use the editor.
  47. If "Cursor" does not find an error during compilation it will create an
  48. executable file whose name is that of the source text without its extention.
  49.  
  50.  
  51.  
  52.  
  53.   COMPILED PROGRAMMES
  54.  
  55. - All compiled programmes are "pure", "Cursor" sets the "pure"-bit of
  56.   the programmes automatically.
  57.  
  58. - Programmes can be started from the CLI or the Workbench.
  59.   Parameters passed from the CLI are treated like the user typed them in
  60.   using the keyboard separating them with the <RETURN>-key.
  61.  
  62. - If an error occurs while a compiled program is running, an errormessage
  63.   will either be written to standard output (if it exitst) or a requester
  64.   will appear.
  65.  
  66. - You can abort a compiled program almost always by using a WINDOWCLOSE-
  67.   gadget or <CTRL>-C.
  68.  
  69.  
  70.  
  71.  
  72.   OPTIONS
  73.  
  74. You can select different options which influence the compiled programmes.
  75. You can do this from the editor "CursorMenu", with the "OPTION"-command
  76. in the source text (e.g. "OPTION NOWINDOW) or using CLI-parameters (e.g.
  77. "Cursor -b2 Test.bas").
  78.  
  79. The following options are possible:
  80.  
  81. - NOWINDOW (-w0 from the CLI), OPENWINDOW (-w1)
  82.   NOWINDOW: No window is opened automatically when the compiled program
  83.   is started.
  84.   OPENWINDOW (default): A new window with the number 1 is opened on
  85.   the Workbench-screen or the screen of the editor "CursorMenu".
  86.  
  87. - ALLPCRELATIVE (-b2), SOMEPCRELATIVE (-b1), NOPCRELATIVE (-b0)
  88.   ALLPCRELATIVE: "Cursor" assumes that all branches in the compiled
  89.   program do not reach further than 32K. The compiled program will get
  90.   shorter because of this.
  91.   SOMEPCRELATIVE (default): "Cursor" only assumes that all branches within
  92.   subprogrammes do not reach further than 32K.
  93.   NOPCRELATIVE: All branches can reach as far as they want.
  94.  
  95. - STANDALONE (-s)
  96.   If this option is selected the executable will not need the "basic.library"
  97.   at runtime, but it must be present in the current or the "LIBS:"-directory
  98.   during compilation. Though the executable will get about 30K larger, you
  99.   now are sure that your program always runs with the correct version of the
  100.   library. You should use this switch if you want to give your programmes to
  101.   other users.
  102.  
  103. - LISTING (-l[<listing file>])
  104.   With this switch you can tell the compiler to produce a list of all
  105.   variables of the program. The list will include the subprogram each
  106.   variable belongs to and the number of every line with a reference to that
  107.   variable. The list is written to a file with the extention ".lst"
  108.   or to the file the user selected from the CLI.
  109.  
  110.  
  111.  
  112.  
  113.   SUPPORTED COMMANDS AND FUNCTIONS
  114.  
  115. "Yes" means that the command or function should work (almost exactly)
  116. as the same AmigaBASIC-command/function, "No" means that the command/
  117. function is not yet implemented.
  118. If a command or a function is not implemented this does not necessarily
  119. means that "Cursor" tells you about this during the compilation but the
  120. compiled program will quit with an "advanced feature"-errormessage
  121. when it reaches the command/function.
  122.  
  123. ABS()              Yes
  124. AREA               Yes
  125.   20 different points can be used
  126. AREAFILL           Yes
  127. ASC()              Yes
  128. ATN()              Yes
  129. BEEP
  130.   Works, but no sound.
  131. BREAK              Yes
  132. CALL               Yes
  133. CDBL()             Yes
  134. CHAIN              Not possible
  135. CHDIR              Yes
  136. CHR$()             Yes
  137. CINT()             Yes
  138. CIRCLE             No
  139. CLEAR              Yes
  140.   Used to set the size of memory used for string-variables und for the
  141.   stack (for GOSUB/RETURN and CALL/SUB). These memory-sizes are not
  142.   changed while the compiled program is running, they are always set
  143.   to the largest values found during compilation. This means that the
  144.   parameters of the CLEAR-command must be constant values. The
  145.   default values are 25000 bytes for string-variables and 4000 bytes
  146.   for the stack.
  147. CLNG()             Yes
  148. CLOSE              Yes
  149. CLS                Yes
  150. COLLISION          Yes
  151. COLLISION()        Yes
  152. COLOR              Yes
  153. COMMON             Not possible
  154. CONT               Not possible
  155. COS()              Yes
  156. CSNG()             Yes
  157. CSRLIN             Yes
  158. CVI()              Yes
  159. CVL()              Yes
  160. CVS()              Yes
  161. CVD()              Yes
  162. DATA               Yes
  163. DATE$              Yes
  164. DECLARE FUNCTION   Yes
  165. DEF FN             Yes
  166. DEFINT             Yes
  167. DEFLNG             Yes
  168. DEFSNG             Yes
  169. DEFDBL             Yes
  170. DEFSTR             Yes
  171. DELETE             Not possible
  172. DIM                Yes
  173. END                Yes
  174. END SUB            Yes (see "SUB")
  175. EOF()              Yes
  176. ERASE              Yes
  177. ERL                Yes
  178. ERR                Yes
  179. ERROR              Yes
  180. EXIT SUB           Yes (see "SUB")
  181. EXP()              Yes
  182. FIELD              Yes
  183. FILES              Yes
  184. FIX()              Yes
  185. FOR                Yes
  186. FRE()              Yes
  187.   FRE(-3) Returns AvailMem(MEMF_LARGEST) like AmigaBASIC does.
  188.   FRE(0)  Forces a Garbage-Collection and returns the size of free memory
  189.           for string-variables.
  190. GET                Yes
  191. GOSUB              Yes
  192. GOTO               Yes
  193. HEX$()             Yes
  194. IF                 Yes
  195. INKEY$             Yes
  196. INPUT              Yes
  197. INPUT$()           Yes
  198. INPUT #            Yes
  199. INSTR              Yes
  200. INT()              Yes
  201. KILL               Yes
  202. LBOUND             No
  203. LEFT$()            Yes
  204. LEN()              Yes
  205. LET                Yes
  206. LIBRARY            Yes
  207.   The ".bmap"-files are only needed during compilation
  208. LINE               Yes
  209. LINE INPUT         Yes
  210. LINE INPUT #       Yes
  211. LIST               Not possible
  212. LLIST              Not possible
  213. LOAD               Not possible
  214. LOC()              Yes
  215. LOCATE             Yes
  216. LOF()              Yes
  217. LOG()              Yes
  218. LPOS()             Yes
  219. LPRINT             Yes
  220. LPRINT USING       Yes
  221. LSET               Yes
  222. MENU               Yes
  223. MENU()             Yes
  224. MERGE              Not possible
  225. MID$()             Yes
  226. MKI$()             Yes
  227. MKL$()             Yes
  228. MKS$()             Yes
  229. MKD$()             Yes
  230. MOUSE()            Yes
  231. MOUSE              Yes
  232. NAME               Yes
  233. NEW                Not possible
  234. NEXT               Yes
  235. OBJECT.AX          Yes
  236. OBJECT.AY          Yes
  237. OBJECT.CLIP        Yes
  238. OBJECT.CLOSE       Yes
  239. OBJECT.HIT         Yes
  240. OBJECT.ON          Yes
  241. OBJECT.OFF         Yes
  242. OBJECT.PLANES      Yes
  243. OBJECT.PRIORITY    No
  244. OBJECT.SHAPE       Yes
  245. OBJECT.START       Yes
  246. OBJECT.STOP        Yes
  247. OBJECT.VX          Yes
  248. OBJEXT.VX()        Yes
  249. OBJECT.VY          Yes
  250. OBJECT.VY()        Yes
  251. OBJECT.X           Yes
  252. OBJECT.X()         Yes
  253. OBJECT.Y           Yes
  254. OBJECT.Y()         Yes
  255. OCT$()             Yes
  256. ON BREAK GOSUB     Yes
  257. ON COLLISION GOSUB Yes
  258. ON ERROR GOTO      Yes
  259. ON MENU GOSUB      Yes
  260. ON MOUSE GOSUB     Yes
  261. ON TIMER ... GOSUB Yes
  262. ON ... GOSUB       Yes
  263. ON ... GOTO        Yes
  264. OPEN               Only for OUTPUT/APPEND/INPUT.
  265. OPTION BASE        No
  266. PAINT              Yes
  267. PALETTE            Yes
  268. PATTERN            Yes
  269. PEEK               Yes
  270. PEEKL              Yes
  271. PEEKW              Yes
  272. POINT              Yes
  273. POKE               Yes
  274. POKEL              Yes
  275. POKEW              Yes
  276. POS()              Yes
  277. PRESET             Yes
  278. PRINT (or ?)       Yes
  279. PRINT USING        Yes
  280. PRINT #            Yes
  281. PRINT USING #      Yes
  282. PSET               Yes
  283. PTAB               Yes
  284. PUT                Yes
  285. RANDOMIZE          Yes
  286. READ               Yes
  287. REM                Yes
  288. RESTORE            Yes
  289. RESUME             Yes
  290. RETURN             Yes
  291. RIGHT$()           Yes
  292. RND()              Yes
  293.   The randomnumber-generator was taken from Steve Beats (Fish disk 20).
  294. RSET               Yes
  295. RUN                No
  296. SADD()             Yes
  297. SAVE               Not possible
  298. SAY                Yes
  299. SCREEN             Yes
  300. SCREEN CLOSE       Yes
  301. SCROLL             Yes
  302. SGN()              Yes
  303. SHARED             Yes
  304. SIN()              Yes
  305. SLEEP              Yes
  306. SOUND              No
  307. SPACE$()           Yes
  308. SPC()              Yes
  309. SQR()              Yes
  310. STICK              Yes
  311.   read hardware registers directly
  312. STOP               No
  313. STR$()             Yes
  314. STRIG()            Yes
  315.   read hardware registers directly
  316. STRING$()          Yes
  317. SUB                Yes
  318.   Parameters are passed by value and result and not by reference (as I
  319.   think AmigaBASIC does).
  320.   Recursions are allowed, values of local variables are lost after a
  321.   subprogram was left.
  322. SWAP               Yes
  323. SYSTEM             Yes
  324. TAB()              Yes
  325. TAN()              Yes
  326. TIME$              Yes
  327. TIMER              Yes
  328. TIMER()            Yes
  329. TRANSLATE$()       Yes
  330. TRON               No
  331. TROFF              No
  332. UBOUND             No
  333. UCASE$             Yes
  334. VAL                Yes
  335. VARPTR             Yes
  336. WAVE               No
  337. WEND               Yes
  338. WHILE              Yes
  339. WIDTH              No
  340. WINDOW             Yes
  341. WINDOW CLOSE       Yes
  342. WINDOW OUTPUT      Yes
  343. WINDOW()           Yes
  344. WRITE              Yes
  345. WRITE #            Yes
  346.  
  347.   also supported:
  348. =, <, >, <=, >=, <>, MOD, *, /, ^, +, -, \, NOT, AND, OR, XOR, EQV, IMP
  349.  
  350.  
  351.  
  352.  
  353.   ABOUT THE COMPILER
  354.  
  355. "Cursor" was first written in AmigaBASIC but has been converted to
  356. SAS/Lattice C now. The Library "basic.library" was written in assembler
  357. and compiled using "A68k" from Charlie Gibbs.
  358.  
  359.  
  360.  
  361.  
  362. Please send bug reports, suggestions for improvements, MONEY, etc. to
  363.  
  364.                                             Jürgen Forster
  365.                                             Lintheide 9
  366.                                             33719 Bielefeld
  367.                                             Germany
  368.  
  369.